package com.jt.www.enums.woxuebao;

import org.apache.commons.lang.StringUtils;

/**
 * @author admin_ltf
 * @create 2019-06-02 9:13
 */

public enum JNXPXProgramCodeEnum {

    code1("19PR979745", "1", "19FA595040"),
    code2("19PR979745", "2", "19FA210077"),
    code3("19PR979745", "3", "19FA143892");

    private String productcode;
    private String level;
    private String code;

    JNXPXProgramCodeEnum(String productcode, String level, String code) {
        this.productcode = productcode;
        this.level = level;
        this.code = code;
    }

    public static String getProgramCode(String productcode, String level) {
        String code = "";
        if (StringUtils.isEmpty(productcode) || StringUtils.isEmpty(level)) {
            return code;
        }
        for (JNXPXProgramCodeEnum hTCXCZProgramCodeEnum : JNXPXProgramCodeEnum.values()) {
            if (hTCXCZProgramCodeEnum.productcode.equals(productcode) && hTCXCZProgramCodeEnum.level.equals(level)) {
                code = hTCXCZProgramCodeEnum.code;
                break;
            }
        }

        return code;

    }

    public String getProductcode() {
        return productcode;
    }

    public void setProductcode(String productcode) {
        this.productcode = productcode;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
